﻿<local:DocumentBase x:Class="WPFExcelReport.AB55DI"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" Background="White"
                  Loaded="Window_Loaded"
                    Title="AB55DI"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button FontSize="18" Content="查询数据" Height="Auto" Margin="10,0,0,0" Name="butGetData" Click="butGetData_Click"></Button>
            <Button FontSize="18" Content="生成报表" Height="Auto" Margin="30,0,0,0"  Name="btnQuery" Width="Auto" Click="btnQuery_Click"/>
            <TextBlock FontSize="18"  Height="Auto"   Width="59" Name="txt1" Margin="10,10,0,0" Text="生产单" />
            <TextBlock FontSize="18"  Height="Auto"   Width="47" Name="txtABPAUFKRS" Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="Auto"    Width="130" Name="txtABPAUFLFD"   Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="Auto"    Width="50" Name="txtABPAUFPOS"   Margin="5,10,0,0" Text="" />
            <Label  FontSize="18" Content="浆纱单" Height="Auto" Name="label1" Width="Auto" Margin="10,10,0,0" />
            <TextBox FontSize="18"  Height="Auto"  Background="Pink"  CharacterCasing="Upper" Width="47" Name="txtAUFKRS" Margin="5,10,0,0" Text="" />
            <TextBox  FontSize="18" Height="Auto"  Background="Beige"  CharacterCasing="Upper" Width="130" Name="txtAUFLFD"   Margin="5,10,0,0" Text="" />
            <TextBox  FontSize="18" Height="Auto"  Background="Yellow"  CharacterCasing="Upper" Width="50" Name="txtAUFPOS"   Margin="5,10,0,0" Text="" />
            <Button Content="试样配纬" Height="Auto" Margin="10,10,0,0"  Name="btnQuery1" Width="90" Click="btnQuery1_Click"/>
            <Button Content="工艺试纬" Height="Auto" Margin="10,10,0,0"  Name="btnQuery2" Width="90" Click="btnQuery2_Click"/>
        </StackPanel>
        <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ABPOS}" x:Name="ABPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="2" Margin="0,98,0,178" Grid.RowSpan="3">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="加工厂"   Binding="{Binding LSNAME1}"/>
                <DataGridTextColumn Header="生"     Binding="{Binding Path=ABPAUFKRS}"/>
                <DataGridTextColumn Header="产"     Binding="{Binding ABPAUFLFD}"/>
                <DataGridTextColumn Header="单"     Binding="{Binding ABPAUFPOS}"/>
                <DataGridTextColumn Header="品种"   Binding="{Binding ABPART}"/>
                <DataGridTextColumn Header="版本"   Binding="{Binding ABPVAR}"/>
                <DataGridTextColumn Header="色号"   Binding="{Binding ABPFARBE}"/>
                <DataGridTextColumn Header="数量"   Binding="{Binding WEI}"/>
                <DataGridTextColumn Header="计划经长"   Binding="{Binding QUANTITY}"/>
                <DataGridTextColumn Header="开始"   Binding="{Binding ABPSTARTDAT}"/>
                <DataGridTextColumn Header="交期"   Binding="{Binding ABPENDDAT}"/>
                <DataGridTextColumn Header="行备注" Binding="{Binding REMARK}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid  Grid.Row="2" CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" 
                               HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               ItemsSource="{Binding Path=GAAUF}" x:Name="listGAAUF" 
                             IsSynchronizedWithCurrentItem="False" Opacity="10" 
                               Visibility="Visible" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="0,24,0,1">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="纱线"  Width="80"  Binding="{Binding GAART}"/>
                <DataGridTextColumn Header="版本"   Binding="{Binding GAVAR}"/>
                <DataGridTextColumn Header="描述"   Binding="{Binding DES}"/>
                <DataGridTextColumn Header="色号"   Binding="{Binding GAFARBE}"/>
                <DataGridTextColumn Header="颜色"   Binding="{Binding GSCBEZ}"/>
                <DataGridTextColumn Header="需求"   Binding="{Binding GAKG1}"/>
                <DataGridTextColumn Header="留位"   Binding="{Binding GAKG3}"/>
                <DataGridTextColumn Header="发纱" Binding="{Binding GAKG5}"/>
                <DataGridTextColumn Header="织造消耗"   Binding="{Binding GAKG6}"/>
                <DataGridTextColumn Header="余纱"   Binding="{Binding GAKG7}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
    </Grid>
</local:DocumentBase>
